#ifndef __INETADDRESS_H__
#define __INETADDRESS_H__

#include <string>
#include <netinet/ip.h>

using std::string;

namespace myNameSpace {
class InetAddress {
public:
    InetAddress(unsigned short port, const string &ip = "127.0.0.1");
    InetAddress(struct sockaddr_in &addr);

    struct sockaddr_in * getInetAddrPtr();
    string getIp() const;
    unsigned short getPort() const;

private:
    struct sockaddr_in _addr;
};
} // end of namespace myNameSpace

#endif
